The present invention relates in general to video image processing and in particular to encoding two data words, each representing differential data values, such as differential luminance values and differential chrominance values.
In image processing, it is known to define individual pixels of an image in terms of several image information values, such as a luminance or brightness value and chrominance or color values. The transmission or storage of such images occurs in that the image information values of the individual pixels of the picture are oriented in a predetermined sequence within a serial data stream, which is saved in memory or transmitted. For pictures in the known YUV format, the individual pixels are assigned a Y-value as the luminance value and a U-value and a V-value as the chrominance values. The number of the Y, U, and V values assigned to a pixel vary according to the format utilized. In the 4:4:4 format, the same number of Y, U, and V values represent each image (i.e., one Y value, one U value and one V value is assigned to each pixel). In the 4:2:2 format, there are twice as many Y values as U and V values. In this format, the transmission or storage of the values of an image occurs as a serial data sequence in which every second data value transmitted is a Y value, followed alternately by a U value and a V value (e.g., Y1-U1-Y2-V1-Y3-U2 . . . ).
Various encoding methods are known for reducing the data transmission rate during the transmission of video or audio data. An example is the Difference Pulse Code Modulation (DPCM) method, which is described, for example, in Ohm, Jens-Rainer: “Digital Image Encoding: Representation, Compression and Transmission,” Springer, 1995, ISBN 3-540,58579-6, pages 246 to 261.
In the DPCM method, instead of absolute values one quantizes and encodes differences of consecutive values of a data sequence. During the transmission of audio data or video data, small signal changes from one value to another typically occur more often than large signal changes in consecutive values, (e.g., in the values representing two consecutive brightness or color video data). Also, the eye is more tolerant when quantizing large signal changes as opposed to relatively smaller signal changes. Thus, large difference values are quantized more coarsely in the DPCM method, while smaller difference values are quantized more finely. The reduction of the transmission rate can be adjusted in terms of the desired precision of the quantization.
Referring to FIGS. 1a-1c, there illustrated is an example of the known DPCM method for encoding luminance and chrominance difference values. Each value can assume an amplitude between −255 and +255. For error-free encoding of these values, nine bits are utilized (one sign bit and eight data bits). To reduce the transmission rate, however, seven bits are made available for the luminance difference values (one sign bit and six data bits), and five bits for the chrominance difference values (one sign bit and four data bits). While this method of encoding reduces the transmission rate or transmission bandwidth, it may also result in a loss of information or errors.
The difference values listed in the tables of FIG. 1b are nonlinearly quantized. The quantization error becomes larger as the amplitude of the difference value being encoded increases. For the luminance difference values, six data bits are utilized. The encoding is performed for amplitude values between 0 and 10 in steps of one, and thus without quantization error. After an amplitude value of 10, the quantization occurs in steps of two, after an amplitude value of 44 in steps of four, and after an amplitude value of 128 in steps of eight. For example, to transmit a luminance difference value with an amplitude of 247, the value 240 is encoded and transmitted, resulting in a quantization error of 7. The encoding table of FIG. 1b for chrominance difference values provides four data bits for the transmission of chrominance difference values. As such, the quantization error for amplitude values above 128 is as much as 63, since after an amplitude value of 128 the quantization occurs in steps of 64.
The translation or encoding of a luminance difference value and a chrominance difference value using the DPCM method into an encoded data word with a length of twelve bits is illustrated in FIG. 1c for a luminance difference value dY=60 and a chrominance difference value dC=19. In addition to the two sign bits (e.g., the sign bit SgnY of the luminance difference value dY, and the sign bit SgnC of the chrominance difference value), the code words dY′ and dC′ taken from the respective encoding tables of FIG. 1b are mapped onto the encoded data word being transmitted. In this example, the transmission of the luminance difference value dY occurs without quantization errors, since the luminance difference value dY=60 corresponds to an interval limit value (i.e., 60) indicated in the luminance encoding table of FIG. 1b. Since the chrominance difference value dC=19 lies between the limit values of 16 and 20 in the chrominance encoding table of FIG. 1b, the difference value dC′=16 is transmitted, resulting in a quantization error of 3.
A problem with the DPCM method, in which two video information values (e.g., one luminance difference value and one chrominance difference value) are mapped onto a common encoded data word, is that the quantization accuracy depends on the encoding tables used. As such, this method can be somewhat inflexible.
German patent application DE 100 07 171 describes a method for encoding several data words in a common encoded data word. In this method, for each data word the number of significant digits is determined and to each data word is assigned significance information depending on the number of these digits. The significance information is arranged in an encoded data word and the individual data bits of the data words are mapped onto the encoded data word.
What is needed is a method for encoding first and second data words that allows for relatively flexible encoding and smaller quantization errors from the encoding for at least certain value pairs of the first and second data words.